package com.qianli.user;

import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySources;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2019-11-28
 * Time: 20:28
 */

@ComponentScan(basePackages = {
        "com.fqgj.xjd.user",
        "com.qianli.user",
        "com.fqgj.common"
})
@ServletComponentScan(basePackageClasses = {com.fqgj.log.filter.TraceFilter.class})
@ImportResource({"classpath:spring/dispatcher-servlet.xml"})
@EnableScheduling
@SpringBootApplication
//@NacosPropertySources({
//        @NacosPropertySource(dataId = "dc-user", autoRefreshed = true),
//        @NacosPropertySource(dataId = "fqgj-public", autoRefreshed = true, groupId = "cashmama"),
//        @NacosPropertySource(dataId = "system-public", autoRefreshed = true, groupId = "cashmama"),
//})
public class UserApplication {
    private static final Logger LOGGER = LoggerFactory.getLogger(UserApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class, args);
        LOGGER.info("=== user 服务启动成功 ====");
    }
}
